package com.neuedu.corejava.ch3.practise;
public class Demo7 {

	public static void main(String[] args) {
		
		int n = 2;
		int result;
		switch (n + 1) {
		case 1:
			System.out.println("Block A");
			result = n;
			break;
		case 2:
			System.out.println("Block B");
			result = n * n;
			break;
		case 3:
			System.out.println("Block C");
			result = n * n * n;
			break;
		default:
			result = 0;
		}
		System.out.println("result=" + result);

	}
}
